package com.littcore.saap.message.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:user_message_sub<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since Nov 4, 2015 11:23:05 AM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "user_message_sub")
public class UserMessageSub implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 订阅号.
	 */
	private Integer id;

	/**
	 * 租户ID.
	 */
	private int tenantId;

	/**
	 * 模块编号.
	 */
	private String moduleCode;

	/**
	 * 消息编号.
	 */
	private String messageCode;

	/**
	 * 消息通道.
	 */
	private String channels;

	/**
	 * 是否弹框.
	 */
	private boolean enablePopup;

	/**
	 * 创建人.
	 */
	private int createBy;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	public UserMessageSub() {
	}

	public UserMessageSub(int tenantId, String moduleCode, String messageCode,
			String channels, boolean enablePopup, int createBy,
			Date createDatetime) {
		this.tenantId = tenantId;
		this.moduleCode = moduleCode;
		this.messageCode = messageCode;
		this.channels = channels;
		this.enablePopup = enablePopup;
		this.createBy = createBy;
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 订阅号.
	 * @return 订阅号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 订阅号.
	 * @param id 订阅号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 租户ID.
	 * @return 租户ID
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 租户ID.
	 * @param tenantId 租户ID
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 模块编号.
	 * @return 模块编号
	 */

	@Column(name = "MODULE_CODE", nullable = false, length = 50)
	public String getModuleCode() {
		return this.moduleCode;
	}

	/**
	 * Set 模块编号.
	 * @param moduleCode 模块编号
	 */
	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	/**  
	 * Get 消息编号.
	 * @return 消息编号
	 */

	@Column(name = "MESSAGE_CODE", nullable = false, length = 50)
	public String getMessageCode() {
		return this.messageCode;
	}

	/**
	 * Set 消息编号.
	 * @param messageCode 消息编号
	 */
	public void setMessageCode(String messageCode) {
		this.messageCode = messageCode;
	}

	/**  
	 * Get 消息通道.
	 * @return 消息通道
	 */

	@Column(name = "CHANNELS", nullable = false, length = 100)
	public String getChannels() {
		return this.channels;
	}

	/**
	 * Set 消息通道.
	 * @param channels 消息通道
	 */
	public void setChannels(String channels) {
		this.channels = channels;
	}

	/**  
	 * Get 是否弹框.
	 * @return 是否弹框
	 */

	@Column(name = "ENABLE_POPUP", nullable = false)
	public boolean isEnablePopup() {
		return this.enablePopup;
	}

	/**
	 * Set 是否弹框.
	 * @param enablePopup 是否弹框
	 */
	public void setEnablePopup(boolean enablePopup) {
		this.enablePopup = enablePopup;
	}

	/**  
	 * Get 创建人.
	 * @return 创建人
	 */

	@Column(name = "CREATE_BY", nullable = false)
	public int getCreateBy() {
		return this.createBy;
	}

	/**
	 * Set 创建人.
	 * @param createBy 创建人
	 */
	public void setCreateBy(int createBy) {
		this.createBy = createBy;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

}
